/*
 * Author  : Leo <lipf160627@163.com>
 * Created : 2025-7-27
 * Desc    : ESP32 GPIO Allocation
 */

#pragma once

#include "driver/gpio.h"

// Led: 4 GPIO
#define LED_FRONT_LEFT_PIN      GPIO_NUM_40
#define LED_FRONT_RIGHT_PIN     GPIO_NUM_41
#define LED_BACK_LEFT_PIN       GPIO_NUM_39
#define LED_BACK_RIGHT_PIN      GPIO_NUM_38
#define LED_ON_LEVEL            0

// Lcd: 6 GPIO with SPI2
#define LCD_SPI_HOST            SPI2_HOST
#define LCD_CLK_PIN             GPIO_NUM_14
#define LCD_MOSI_PIN            GPIO_NUM_13
#define LCD_RST_PIN             GPIO_NUM_12
#define LCD_DC_PIN              GPIO_NUM_11
#define LCD_CS_PIN              GPIO_NUM_10
#define LCD_BLK_PIN             GPIO_NUM_9

// ASR-PRO: 2 GPIO with UART1
#define ASRPRO_UART_NUM         UART_NUM_1
#define ASRPRO_UART_BAUDRATE    9600
#define ASRPRO_TX_PIN           GPIO_NUM_17
#define ASRPRO_RX_PIN           GPIO_NUM_18

// Ultrasonic: 2 GPIO
#define ULTRASONIC_TRIG_PIN     GPIO_NUM_7
#define ULTRASONIC_ECHO_PIN     GPIO_NUM_6

// Servo driver board PCA9685: 2 GPIO including one I2C1
#define SERVO_SCL_PIN           GPIO_NUM_15
#define SERVO_SDA_PIN           GPIO_NUM_16

// MCU board 2: 2 GPIO with UART2
#define CO_MCU_UART_NUM         UART_NUM_2
#define CO_MCU_UART_BAUDRATE    9600
#define CO_MCU_TX_PIN           GPIO_NUM_21
#define CO_MCU_RX_PIN           GPIO_NUM_20
